package logger

// 日志模块
// 封装goFrame 日志模块
// 日志等级分为 debug info warn error fatal
import (
	"github.com/gogf/gf/v2/frame/g"
	"github.com/gogf/gf/v2/os/glog"
)

type HyperNexusLogger struct {
	*glog.Logger
}

func NewHyperNexusLogger(config map[string]interface{}) *HyperNexusLogger {
	h := &HyperNexusLogger{
		g.Log(),
	}
	_ = h.SetConfigWithMap(config)
	return h
}

func NewHyperNexusLoggerByName(name string, config glog.Config) *HyperNexusLogger {
	h := &HyperNexusLogger{
		g.Log(name),
	}
	_ = h.SetConfig(config)
	return h
}
